<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="java.util.ArrayList,edu.wfmanage.models.*, com.opensymphony.xwork2.ActionContext,java.util.Map,java.util.List" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Tag User</title>
<script language="javascript">
function doValidation() {
	var role=document.getElementById("role").value;
	var user=document.getElementById("user").value;
	if (role==""){
		alert("Role field is manadtaory.Please enter appropriately");
		return false;
	}
	if (user==""){
		alert("User field is manadtaory.Please enter appropriately");
		return false;
	}
	return true;
}
</script>
</head>
<body>
<h2>Tag User to a particular Role</h2>
<s:form action="adminTagUser" name="role">
<table id="text" align="center">
<tr>
<td><s:select label="Select Role" headerKey="" headerValue="-none-" list="roleList" listvalue="name" name="myRole" id="role"></s:select></td>
</tr>
<tr>
<td><s:select label="Tag User to Role" headerKey="" headerValue="-none-" list="userList" listvalue="name" name="myUser" id="user"></s:select></td>
</tr>
</table>
<table id="text" align="center">
<tr>
<td><s:submit name="commandButton" value="Tag User" id = "mysubmit" style="height: 30px; width: 200px" onclick="return doValidation()">
</s:submit></td>
<td><s:submit name = "commandButton" value="Remove User Tag" id = "mysubmit" style="height: 30px; width: 200px" onclick="return doValidation()">
</s:submit></td>
</tr>
<tr><td></td>
<td><s:form action="back" align="right" name = "Back">
<s:submit name = "commandButton" value="Back to Admin Home" id = "mysubmit" style="height: 30px; width: 200px">
</s:submit></s:form></td>
</tr>
</table>
</s:form>
</body>
</html>